

import 'package:flutter/material.dart';

class ButtonPage extends StatefulWidget{
  @override
  _ButtonPageState createState(){
    return new _ButtonPageState();
  }
}

class _ButtonPageState extends State<ButtonPage>{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: new AppBar(
        title: new Text('按钮'),
      ),
      body: Center(
        child: Flex(
          direction: Axis.vertical,
          children: <Widget>[
            Row(
              mainAxisAlignment:MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                RaisedButton(
                  child: Text('漂浮按钮'),
                  onPressed: (){},
                ),
                RaisedButton.icon(
                  icon: Icon(Icons.send),
                  label: Text("发送"),
                  onPressed: (){},
                ),
              ],
            ),
            Row(
              mainAxisAlignment:MainAxisAlignment.spaceEvenly,
              children: [
                FlatButton(
                  child: Text("扁平按钮"),
                  onPressed: () {},
                ),
                FlatButton.icon(
                  icon: Icon(Icons.info),
                  label: Text("详情"),
                  onPressed: (){},
                ),
              ],
            ),
            Row(
              mainAxisAlignment:MainAxisAlignment.spaceEvenly,
              children: [
                OutlineButton(
                  child: Text("边框按钮"),
                  onPressed: () {},
                ),
                OutlineButton.icon(
                  icon: Icon(Icons.add),
                  label: Text("添加"),
                  onPressed: (){},
                ),
              ],
            ),
            IconButton(
              icon: Icon(Icons.thumb_up),
              onPressed: () {},
            ),
            FlatButton(
              color: Colors.blue,
              highlightColor: Colors.blue[700],
              colorBrightness: Brightness.dark,
              splashColor: Colors.grey,
              child: Text("Submit"),
              shape:RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
              onPressed: () {},
            )
          ],
        ),
      ),
    );
  }
}
